cmake_minimum_required(VERSION 2.6)

project(CP_Dialogs)

if(UNIX)
	set(CP_INSTALL_BY_DEFAULT ON)
else(UNIX)
	set(CP_INSTALL_BY_DEFAULT OFF)
endif(UNIX)

option(CP_INSTALL "Install libs, includes, and CMake scripts" ${CP_INSTALL_BY_DEFAULT})
option(CP_BUILD_DEBUG "Build with debugging symbols" ON)
option(CP_BUILD_SHARED "Build shared libraries" ON)
option(CP_BUILD_STATIC "Build static libraries" ON)
option(CP_BUILD_DEMOS "Build demo programs" ON)

set(CP_VERSION 0.0.1)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMake_scripts)

if ( CP_BUILD_DEBUG )
	SET(CMAKE_BUILD_TYPE Debug)
else ( CP_BUILD_DEBUG )
	SET(CMAKE_BUILD_TYPE Release)
endif ( CP_BUILD_DEBUG )


# Make local includes look in the right places
include_directories(source)

add_definitions("-Wall -pedantic")

# Build the library.
add_subdirectory(source)

# Build the demos
if(CP_BUILD_DEMOS)
  add_subdirectory(demos)
endif(CP_BUILD_DEMOS)
